import request from '@/utils/request'

// 查询互市车辆备案信息列表
export function listVehicle(query) {
  return request({
    url: '/bt/vehicle/list',
    method: 'get',
    params: query
  })
}

// 查询互市车辆备案信息详细
export function getVehicle(id) {
  return request({
    url: '/bt/vehicle/' + id,
    method: 'get'
  })
}

// 新增互市车辆备案信息
export function addVehicle(data) {
  return request({
    url: '/bt/vehicle',
    method: 'post',
    data: data
  })
}

// 修改互市车辆备案信息
export function updateVehicle(data) {
  return request({
    url: '/bt/vehicle',
    method: 'put',
    data: data
  })
}

// 删除互市车辆备案信息
export function delVehicle(id) {
  return request({
    url: '/bt/vehicle/remove/' + id,
    method: 'get'
  })
}

export function revokeVehicle(id) {
  return request({
    url: '/bt/vehicle/revoke/' + id,
    method: 'get'
  })
}

// 导出互市车辆备案信息
export function exportVehicle(query) {
  return request({
    url: '/bt/vehicle/export',
    method: 'get',
    params: query
  })
}

// 申报互市车辆备案信息
export function declVehicle(id) {
  return request({
    url: '/bt/vehicle/decl/' + id,
    method: 'post',
    timeout: 60000
  })
}

// 删除互市车辆备案信息
export function getVehicleInfo(params) {
  return request({
    url: '/bt/vehicle/getInfoByVeNo/' + params,
    method: 'get'
  })
}


//审核互市车辆备案信息
export function auditVehicle(id) {
  return request({
    url: '/bt/vehicle/audit/' + id,
    method: 'post',
  })
}

// 车辆备案-变更申报
export function updateVehicleDecl(params) {
  return request({
    url: '/bt/vehicle/modifyDecl',
    method: 'post',
    data: params
  })
}
